package com.yourbatis.syntax;

import static com.yourbatis.syntax.Keywords.*;

public class KeywordExpression implements Expression{
    public KeywordExpression(String keyword) {
        this.keyword = keyword;
    }

    private String keyword;
    @Override
    public Object eval() {
        if(NULL.equals(keyword)){
            return null;
        }
        if(FALSE.equals(keyword)){
            return false;
        }
        if(TRUE.equals(keyword)){
            return true;
        }
        throw new RuntimeException("unknown keyword");
    }
}
